home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Adobe Graphics & Publishing SDK 1996 December
/
Adobe Graphics & Publishing SDK 1996 December.iso
/
pc
/
pm65sdk
/
sourcecode
/
includes
/
ciframe.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-11-18
|
5KB
|
153 lines
/**[f******************************************************************
* CIFrame.h -- CIFrame Interface definition
*
* Copyright (c) 1996 Adobe Systems, Inc. All Rights Reserved
*
*
* ABSTRACT: Frame interface
*
* USAGE:
*
* ROUTINES DEFINED:
* $Revision: 1.8 $
*
*
*
*
**f]******************************************************************/
#ifndef __CIFRAME_H
#define __CIFRAME_H
#ifndef __CIOBJACC_H
#include "CIObjectAccess.h"
#endif
const BYTE InvalValue = 0xff;
// Frame shapes
const WORD Unknown = 0;
const WORD Box = 1;
const WORD Oval = 2;
const WORD RegularPolygon = 3;
const WORD IrregularPolygon = 4;
// Content type
const BYTE TypeEmpty = 0;
const BYTE TypeText = 1;
const BYTE TypePicture = 2;
// Horizontal alignment: For picture content only
const BYTE AlignHorzLeft = 0;
const BYTE AlignHorzCenter = 1;
const BYTE AlignHorzRight = 2;
const BYTE AlignHorzCustom = 3;
// Vertical alignment: For both picture and text contents
const BYTE AlignVertTop = 0;
const BYTE AlignVertCenter = 1;
const BYTE AlignVertBottom = 2;
const BYTE AlignVertCustom = 3;
// Scale type
const BYTE Clip_To_Fit = 0;
const BYTE Size_To_Fit = 1;
const BYTE Scale_To_Fit = 2;
class CIFrame : public CIInterface
{
public:
// Is this object a frame?
// Use this to validate that a returned PMOBJ_REC really is a frame
// before calling other CIFrame routines.
virtual PMBool IsAFrame(PMOBJ_REC* pPMRec) = 0;
// Change selected BOP objects into frames
virtual PMErr ToggleFrame() = 0;
// Create an empty frame (returns filled in pFrameID if specified)
virtual PMErr CreateFrame(RECT* prBound, WORD wShape, PMOBJ_REC *pFrameID = NULL) = 0;
// Place text insertion point inside a frame
virtual PMErr NewText(PMOBJ_REC* pPMRec) = 0;
// Insert text into a frame
virtual PMErr InsertText(PMOBJ_REC* pPMRec, LPSTR pStr) = 0;
// Get the content type of frames
// Returns Type_empty, TypeText or TypePicture
virtual PMErr GetContentType(PMOBJ_REC* pFrameID, BYTE* pType) = 0;
// Is this frame empty?
virtual PMBool EmptyFrame(PMOBJ_REC* pFrameID) = 0;
// Does this frame have content?
virtual PMBool FullFrame(PMOBJ_REC* pFrameID) = 0;
// Get/Set the "maintain aspect ratio" attribute for frames.
virtual PMErr GetAspect(PMOBJ_REC* pFrameID, PMBool* pbAspect) = 0;
virtual PMErr SetAspect(PMOBJ_REC* pFrameID, PMBool bAspect) = 0;
// Get/Set the horizontal alignment for picture content.
virtual PMErr GetHorzAlign(PMOBJ_REC* pFrameID, BYTE* pAlign) = 0;
virtual PMErr SetHorzAlign(PMOBJ_REC* pFrameID, BYTE align) = 0;
// Get/Set the vertical alignment for picture content.
virtual PMErr GetVertAlign(PMOBJ_REC* pFrameID, BYTE* pAlign) = 0;
virtual PMErr SetVertAlign(PMOBJ_REC* pFrameID, BYTE align) = 0;
// Get/Set the scale type for the frame.
virtual PMErr GetScaleType(PMOBJ_REC* pFrameID, BYTE* pScaleType) = 0;
virtual PMErr SetScaleType(PMOBJ_REC* pFrameID, BYTE scaleType) = 0;
// Get/Set the margin for the text frame.
virtual PMErr GetMargin(PMOBJ_REC* pFrameID, RECT* prMargin) = 0;
virtual PMErr SetMargin(PMOBJ_REC* pFrameID, RECT* prMargin) = 0;
//*** Contents
// Get the content of a frame, if any.
virtual PMErr GetContent(PMOBJ_REC* pContID, PMOBJ_REC* pFrameID) = 0;
// Attach a PM object to a frame.
virtual PMErr AttachContent(PMOBJ_REC* pFrameID = NULL, PMOBJ_REC* pContID = NULL) = 0;
// Delete content of frame.
virtual PMErr DeleteContent(PMOBJ_REC* pFrameID = NULL) = 0;
// Separate content from frame.
virtual PMErr SeparateContent(PMOBJ_REC* pFrameID = NULL) = 0;
// Move content of frame by ptOffset.
virtual PMErr MoveContent(PMOBJ_REC* pFrameID, POINT ptOffset) = 0;
// Scale content of frame according to the current scale type.
// bAspect indicates whether to maintain the aspect ratio.
virtual PMErr ScaleContent(PMOBJ_REC* pFrameID, PMBool bAspect) = 0;
//*** Size and position
// Move frame by ptOffset.
virtual PMErr MoveFrame(PMOBJ_REC* pFrameID, POINT ptOffset) = 0;
// Resize frame to pRect.
virtual PMErr ResizeFrame(PMOBJ_REC* pFrameID, RECT* pRect) = 0;
//*** Links
// Get the linked frame of pFrameID, return the linked frame in pLinkID.
// bUpStream is true if we want to get the previous frame; otherwise, the
// next frame will be returned
virtual PMErr GetLinkFrame(PMOBJ_REC* pFrameID, PMOBJ_REC* pLinkID, PMBool bUpStream) = 0;
// Set the linked frame of pFrameID, the frame to be linked is given in pLinkID.
// bUpStream is true if we want to set the previous frame; otherwise, the
// next frame will be set.
virtual PMErr SetLinkFrame(PMOBJ_REC* pFrameID, PMOBJ_REC* pLinkID, PMBool bUpStream) = 0;
// Breaks the links of currently selected frames.
virtual PMErr BreakFrameLinks(PMOBJ_REC* pFrameID = NULL) = 0;
};
#endif